package compositePattern;

public class Main {
    public static void main(String[] args) {
        // 创建员工
        Developer dev1 = new Developer("A", "Java Developer");
        Developer dev2 = new Developer("B", "C# Developer");
        Designer designer1 = new Designer("C", "UI/UX Designer");

        // 创建经理
        Manager manager1 = new Manager("Manager1", "Development Manager");

        // 经理添加下属
        manager1.add(dev1);
        manager1.add(dev2);
        manager1.add(designer1);

        // 打印组织结构
        System.out.println("Manager 1 Details:");
        manager1.showDetails();
    }
}
